#pragma once
class GLTex
{
public:
	static void deleteTexId(UINT id);
	static long createOpenGLTex(const CString&imagePath,bool bReCreate);
	static void removeAll();
private:
	static BOOL openTexture(
		__in const CString&filePath
		,__out UINT&openglTex
		);
	static BOOL read_image(const TCHAR*path,UINT&texid);
	static void calc_pic_size(long &cx, long &cy, BOOL bLarge);
	enum tex_type
	{
		type_rgb,
		type_bgra,
	};
	static long create_opengl_tex(tex_type type,long width,long height,const BYTE*buf);
};

